﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="Country.aspx.cs" Inherits="Admin_Country"  %>
<%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
 <div id="page-heading">
        <h1>
            View Country</h1>
    </div>
    <!-- end page-heading -->
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
        <tr>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
            <th class="topleft">
            </th>
            <td id="tbl-border-top">
                &nbsp;</td>
            <th class="topright">
            </th>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
        </tr>
        <tr>
            <td id="tbl-border-left">
            </td>
            <td>
                <!--  start content-table-inner ...................................................................... START -->
                <div id="content-table-inner">
                    <!--  start table-content  -->
                    <div id="table-content">
                        <div style="color: Red; font-weight: bold; text-align: center;">
                            <asp:Literal ID="lb_error" runat="server"></asp:Literal>
                        </div>
                        <!--  start product-table ..................................................................................... -->
                        <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
                            <asp:Repeater ID="rptList" runat="server" OnItemCommand="rptList_ItemCommand" OnItemDataBound="rptList_ItemDataBound">
                                <HeaderTemplate>
                                    <tr>
                                        <th class="table-header-check">
                                            <asp:CheckBox ID="checkall" onclick='CheckAll(this)' runat="server" />
                                        </th>
                                        <th class="table-header-repeat line-left minwidth-1">
                                            <asp:LinkButton ID="lbtNote" runat="server" CommandArgument="ASC" CommandName="sortName">Country Name</asp:LinkButton>
                                            <%--<a href="">Country Name</a>--%>
                                        </th>
                                        <th class="table-header-repeat line-left minwidth-1">
                                            <asp:LinkButton ID="lbtOrder" runat="server" CommandArgument="ASC" CommandName="sortOrder">Order</asp:LinkButton>
                                            <%--<a href="">Order</a></th>--%>
                                        <th class="table-header-repeat line-left">
                                            <a href="">Enable</a></th>
                                        <th class="table-header-options line-left">
                                            <a href="">Options</a></th>
                                    </tr>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr class="alternate-row" id="tr" runat="server">
                                        <td>
                                            <asp:CheckBox runat="server" ID="ckbDelete" />
                                            <asp:HiddenField ID="hidID" runat="server" />
                                        </td>
                                        <td>  <a href="AddCountry.aspx?id=<%#DataBinder.Eval(Container.DataItem,"CountryID")%>">
                                            <%# Server.HtmlEncode(Convert.ToString(DataBinder.Eval(Container.DataItem, "Name")))%></a>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtOrder" runat="server"></asp:TextBox>
                                            </td>
                                        <td>
                                                <asp:CheckBox ID="ckEnable" runat="server" />
                                                </td>                              
                                        <td class="options-width">
                                            <a href="AddCountry.aspx?id=<%#DataBinder.Eval(Container.DataItem,"CountryID")%>" title="Edit" class="icon-1 info-tooltip"></a>
                                             <asp:LinkButton CssClass="icon-2 info-tooltip" ID="lndelete" OnClientClick="javascript: return confirm('Are you sure delete this rows?');"
                                runat="server" OnClick="lndelete_Click" CausesValidation="false" ToolTip="Delete"></asp:LinkButton>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                        <!--  end product-table................................... -->
                    </div>
                    <!--  end content-table  -->
                    <!--  start actions-box ............................................... -->
                    <div id="actions-box">
                        <a href="" class="action-slider"></a>
                        <div id="actions-box-slider">
                            <a href="AddCountry.aspx" class="action-edit">Add</a>
                            <asp:LinkButton CssClass="action-delete" ID="lndelete" OnClientClick="javascript: return confirm('Bạn có chắc là muốn xóa dòng này?');"
                                runat="server" OnClick="lndelete_Click" CausesValidation="false">Delete</asp:LinkButton>
                            <%-- <a href="" class="action-delete">
                             
                             Delete</a>--%>
                        </div>
                        <div class="clear">
                        </div>
                    </div>
                    <%--<div class="actions-box">
                        <asp:Button ID="btnSave" OnClick="btnSave_OnClick" runat="server" CssClass="classbutt" Text="Update" />
                    </div>--%>
                    <div class="actions-box">
                        <asp:LinkButton ID="btnSave" runat="server" OnClick="btnSave_OnClick">
                                        <img src="images/Update.png" onmouseover="this.src='images/UpdateMouseOver.png';" onmouseout="this.src='images/Update.png';" alt="Search" /></asp:LinkButton>
                    </div>
                    <!-- end actions-box........... -->
                    <!--  start paging..................................................... -->
                    <table border="0" cellpadding="0" cellspacing="0" id="paging-table">
                        <tr>
                            <%--<td>
                                <a href="" class="page-far-left"></a><a href="" class="page-left"></a>
                                <div id="page-info">
                                    Page <strong>1</strong> / 
                                    <asp:Literal ID="ltrNum" runat="server"></asp:Literal></div>
                                <a href="" class="page-right"></a><a href="" class="page-far-right"></a>
                            </td>--%>
                            <td>                                
                                 <div style="width: 600px; float: left;">
                                    <div class="pages a_right" style="padding-bottom: 3px;" align="center">
                                        <strong>
                                            <cc1:PagerV2_8 ID="hyperlinkPager" runat="server" CompactModePageCount="5" GenerateFirstLastSection="true"
                                                OnCommand="pager_Command" GeneratePagerInfoSection="false" GenerateSmartShortCuts="false"
                                                GenerateHiddenHyperlinks="false" NormalModePageCount="5" PageSize="8" RTL="False"
                                                FirstClause="«" LastClause="»" NextClause="›" PreviousClause="‹" />
                                        </strong>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                    <!--  end paging................ -->
                    <div class="clear">
                    </div>
                </div>
                <!--  end content-table-inner ............................................END  -->
            </td>
            <td id="tbl-border-right">
            </td>
        </tr>
        <tr>
            <th class="sized bottomleft">
            </th>
            <td id="tbl-border-bottom">
                &nbsp;</td>
            <th class="sized bottomright">
            </th>
        </tr>
    </table>
    <div class="clear">
        &nbsp;</div>

    <script type="text/javascript">
       function CheckAll(obj)
        {
            // find any item not check
            var countUncheck = 0;
            var checkAll = true;
            var checkList = document.getElementsByTagName("input");
            if(!obj.checked)
            checkAll = false;
            for(var i = 0 ; i < checkList.length ; i++)
            { 
                if(checkList[i].type == 'checkbox' && checkList[i].id.indexOf("ckbDelete") >= 0 )
                {
                checkList[i].checked = checkAll;
                }
            } 
    }
      
    </script>
</asp:Content>

